<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/html">
<head>
    <meta charset="utf-8">
    <title>锋豫智慧平台</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="lib/layui-v2.6.3/css/layui.css" media="all">
    <link rel="stylesheet" href="css/public.css" media="all">
</head>

<body>
<div class="layuimini-container">
    <div class="layuimini-main">
        <div class="layui-col-lg-offset3 layui-col-lg6">
            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                <legend>信件详情</legend>
            </fieldset>

            <form class="layui-form" action="">

                <div class="layui-form-item">
                    <label class="layui-form-label">标题：</label>
                    <div class="layui-input-block">
                        <input type="text" name="title" id="title" value="" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">发件人：</label>
                    <div class="layui-input-block">
                        <input type="text" name="name" id="name" value="" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">发件时间：</label>
                    <div class="layui-input-block">
                        <input type="text" name="createdate" id="createdate" value="" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">发件邮箱：</label>
                    <div class="layui-input-block">
                        <input type="text" name="mail" id="mail" value="" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">信件内容：</label>
                    <div class="layui-input-block">
                        <input type="text" name="content" id="content" value="" class="layui-input">
                    </div>
                </div>



                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit="" lay-filter="demo1">确定</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</body>


<script src="lib/jquery-3.4.1/jquery-3.4.1.min.js"></script>
<script src="lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->

<script type="text/javascript">

    layui.use(['layer', 'form', 'table', 'layedit', 'laydate', 'jquery'], function () {
        var form = layui.form,
            laydate = layui.laydate,
            layer = layui.layer,
            $ = layui.jquery;


        var s = window.decodeURIComponent(location.search.slice(1).split("=")[1]);
        var s1 = JSON.parse(s);

            //页面打开时异步加载数据,查询信道
            $(function () {

                $("#title").val(s1.title);
                $("#name").val(s1.owner.name);
                $("#createdate").val(layui.util.toDateString(s1.creatdate, 'yyyy-MM-dd'));
                $("#mail").val(s1.mail);
                $("#content").val(s1.content);

            });

            // 点击确定之后页面跳转到遍历所有界面
            form.on('submit(demo1)', function (data) {

                    alert("success");
                        window.parent.location.href="listmailbox.html";

            });
       

    })



</script>





</html>